package com.ymttest.database.mapping.godfreight;

import com.ymttest.database.model.godfreight.CollectiongoodsAddress;
import com.ymttest.database.model.godfreight.CollectiongoodsAddressExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface CollectiongoodsAddressMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @SelectProvider(type=CollectiongoodsAddressSqlProvider.class, method="countByExample")
    int countByExample(CollectiongoodsAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @DeleteProvider(type=CollectiongoodsAddressSqlProvider.class, method="deleteByExample")
    int deleteByExample(CollectiongoodsAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @Delete({
        "delete from collectiongoods_address",
        "where AddressId = #{addressId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer addressId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @Insert({
        "insert into collectiongoods_address (AddressId, SellerId, ",
        "AddressName, AddressPic, ",
        "AddressType, BaseAddress, ",
        "DetailAddress, AreaCode, ",
        "Mobile, Deleted, CreateTime, ",
        "UpdateTime)",
        "values (#{addressId,jdbcType=INTEGER}, #{sellerId,jdbcType=INTEGER}, ",
        "#{addressName,jdbcType=VARCHAR}, #{addressPic,jdbcType=VARCHAR}, ",
        "#{addressType,jdbcType=INTEGER}, #{baseAddress,jdbcType=VARCHAR}, ",
        "#{detailAddress,jdbcType=VARCHAR}, #{areaCode,jdbcType=VARCHAR}, ",
        "#{mobile,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(CollectiongoodsAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @InsertProvider(type=CollectiongoodsAddressSqlProvider.class, method="insertSelective")
    int insertSelective(CollectiongoodsAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @SelectProvider(type=CollectiongoodsAddressSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="AddressId", property="addressId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="AddressName", property="addressName", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddressPic", property="addressPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddressType", property="addressType", jdbcType=JdbcType.INTEGER),
        @Result(column="BaseAddress", property="baseAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="DetailAddress", property="detailAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="AreaCode", property="areaCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="Mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="Deleted", property="deleted", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<CollectiongoodsAddress> selectByExample(CollectiongoodsAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @Select({
        "select",
        "AddressId, SellerId, AddressName, AddressPic, AddressType, BaseAddress, DetailAddress, ",
        "AreaCode, Mobile, Deleted, CreateTime, UpdateTime",
        "from collectiongoods_address",
        "where AddressId = #{addressId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="AddressId", property="addressId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="AddressName", property="addressName", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddressPic", property="addressPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="AddressType", property="addressType", jdbcType=JdbcType.INTEGER),
        @Result(column="BaseAddress", property="baseAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="DetailAddress", property="detailAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="AreaCode", property="areaCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="Mobile", property="mobile", jdbcType=JdbcType.VARCHAR),
        @Result(column="Deleted", property="deleted", jdbcType=JdbcType.BIT),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    CollectiongoodsAddress selectByPrimaryKey(Integer addressId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @UpdateProvider(type=CollectiongoodsAddressSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") CollectiongoodsAddress record, @Param("example") CollectiongoodsAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @UpdateProvider(type=CollectiongoodsAddressSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") CollectiongoodsAddress record, @Param("example") CollectiongoodsAddressExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @UpdateProvider(type=CollectiongoodsAddressSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(CollectiongoodsAddress record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table collectiongoods_address
     *
     * @mbggenerated Thu Apr 16 10:29:48 CST 2020
     */
    @Update({
        "update collectiongoods_address",
        "set SellerId = #{sellerId,jdbcType=INTEGER},",
          "AddressName = #{addressName,jdbcType=VARCHAR},",
          "AddressPic = #{addressPic,jdbcType=VARCHAR},",
          "AddressType = #{addressType,jdbcType=INTEGER},",
          "BaseAddress = #{baseAddress,jdbcType=VARCHAR},",
          "DetailAddress = #{detailAddress,jdbcType=VARCHAR},",
          "AreaCode = #{areaCode,jdbcType=VARCHAR},",
          "Mobile = #{mobile,jdbcType=VARCHAR},",
          "Deleted = #{deleted,jdbcType=BIT},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where AddressId = #{addressId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(CollectiongoodsAddress record);
}